Skip to content

[2.x] feat(admin): collapsible extension categories, health widget & abandoned package support#4392

Draft
imorland wants to merge 2 commits into2.xfrom
im/admin-extension-list-improvements
Draft

[2.x] feat(admin): collapsible extension categories, health widget & abandoned package support#4392
imorland wants to merge 2 commits into2.xfrom
im/admin-extension-list-improvements

Conversation

@imorland
Copy link
Member

@imorland imorland commented Feb 26, 2026

Summary

  • Collapsible admin sidebar categories — extension groups are collapsed by default with count badges, category icons, and chevrons. The active extension's category pre-expands on load. Searching auto-expands matching categories. Abandoned extensions show a warning badge on both their sidebar entry and their parent category header.
  • Full category registry — all extension categories (moderation, discussion, authentication, formatting, infrastructure, analytics, other) are now registered in app.extensionCategories so extensions declaring these categories are correctly grouped rather than falling back to feature.
  • Extension Health Widget — replaces the old categorised extension grid (which duplicated the sidebar) with a focused health view: abandoned extensions (with/without replacement package), suggested packages from enabled extensions, and a compact icon grid of disabled extensions.
  • ExtensionLinkButton tooltip — shows extension title and version on hover.
  • getInstalledPackageNames() — new method on ExtensionManager exposing the full flat list of installed Composer packages, used by the health widget to filter already-installed suggestions.
  • flarum.abandoned_overrides settings keyAdminPayload now merges this key over the installed.json-derived abandoned status. This is a forward-compatibility hook allowing a future scheduled Packagist check (planned for the package manager extension) to keep abandoned data fresh without changes to core. Defaults to {} — no behaviour change when absent.
  • Monorepo extension categories — all bundled extensions assigned to their correct category via composer.json.
  • Locale & LESS — new translation keys for all categories and health widget strings; new styles for collapsible nav and health widget.

Docs

Documentation for these changes: flarum/docs#506

Test plan

  • Admin sidebar: all extension categories are collapsed by default on load
  • Clicking a category header toggles it open/closed with chevron animation
  • Count badge shows correct extension count per category
  • Navigating to an extension page pre-expands that extension's category
  • Searching auto-expands categories with matching results; hides empty ones
  • Clearing search returns categories to their prior collapsed state
  • Abandoned extension (with replacement): shows red badge on sidebar entry and category header
  • Abandoned extension (no replacement): shows orange badge
  • Extension Health Widget shows correct sections with accurate counts
  • Suggested packages section shows only packages from enabled extensions that aren't installed
  • Disabled extensions section shows compact icon grid
  • Core nav items (Dashboard, Basics, etc.) are unaffected
  • flarum.abandoned_overrides setting (when set) correctly overrides per-extension abandoned status
  • All monorepo extensions appear in correct sidebar categories

🤖 Generated with Claude Code

…ed package support

- AdminNav: replace static category headers with collapsible groups; each group
  shows a count badge, category icon, and expand/collapse chevron. Categories
  default to collapsed; the active extension's category is pre-expanded on load.
  Searching auto-expands matching categories. Abandoned extensions show a warning
  badge on both their sidebar entry and their parent category header.

- AdminApplication: fully register all extension categories (moderation,
  discussion, authentication, formatting, infrastructure, analytics, other) so
  extensions declaring these categories are correctly grouped rather than falling
  back to 'feature'. Add analytics category for statistics-style extensions.

- ExtensionsWidget: replace the old categorised extension grid (which duplicated
  the sidebar) with an Extension Health Widget showing: abandoned extensions
  (with/without replacement), suggested packages from enabled extensions, and a
  compact icon grid of disabled extensions.

- ExtensionLinkButton: add tooltip showing extension title and version.

- ExtensionManager: add getInstalledPackageNames() to expose the full flat list
  of installed Composer packages, used by the health widget to filter out already-
  installed suggestions.

- AdminPayload: apply flarum.abandoned_overrides settings key on top of the
  installed.json-derived abandoned status, allowing a future scheduled Packagist
  check (e.g. from the package manager extension) to keep abandoned data fresh
  without touching core's parsing logic.

- composer.json (extensions): assign correct categories to all monorepo
  extensions (moderation, discussion, formatting, infrastructure, analytics).

- locale: add all category translation keys; add extension health widget strings.

- LESS: AdminNav collapsible category styles (button reset, count badge, chevron,
  warning icon); ExtensionWidget health widget layout.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
imorland added a commit to flarum/docs that referenced this pull request Feb 26, 2026
…ed package support

Documents changes introduced in flarum/framework#4392:

- Extension Categories: new section in admin.md covering how to declare a
  category in composer.json, the full table of built-in categories with keys,
  labels and icons, and how to register custom categories via app.extensionCategories.

- Extension Health Widget: new section in admin.md covering the three widget
  sections (abandoned, suggested, disabled), how Packagist's abandoned field
  works, how to use Composer's suggest field, and the flarum.abandoned_overrides
  forward-compatibility hook for future scheduled checking.

- update-2_0.md: notable entry for the new admin dashboard (old extension grid
  removed, health widget added); notable entry for the collapsible sidebar
  overhaul with count badges, icons, and search auto-expand.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@imorland imorland changed the title feat(admin): collapsible extension categories, health widget & abandoned package support [2.x] feat(admin): collapsible extension categories, health widget & abandoned package support Feb 26, 2026
@imorland imorland added this to the 2.0.0-beta.8 milestone Feb 26, 2026
m.route.get() returns null during oninit on a hard page reload before
Mithril has processed the hash route. Fall back to window.location.hash
so the correct category is pre-expanded when navigating directly to an
extension URL (e.g. /admin#/extension/flarum-flags).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant